<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>设备管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/project/equipment/equipment/list?projectId=${projectId}">设备列表</a></li>
		<shiro:hasPermission name="project:equipment:equipment:edit"><li><a href="${ctx}/project/equipment/equipment/form?projectId=${projectId}">设备添加</a></li></shiro:hasPermission>
		<li>
			项目ID：<input type="text" value="${projectId}"/>
		</li>
	</ul>
	<form:form id="searchForm" modelAttribute="equipment" action="${ctx}/project/equipment/equipment/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<%--<sys:message content="${message}"/>--%>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>序号</th>
				<th>购买设备名称</th>
				<th>设备购置情况</th>
				<%--<th>设备金额(RMB万元)</th>--%>
				<th>设备付款日期</th>
				<th>设备到位日期</th>
				<th>设备存放地点</th>
				<th>投入使用日期</th>
				<th>社会开放机时</th>
				<th>校内使用机时</th>
				<th>备注</th>
				<shiro:hasPermission name="project:equipment:equipment:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="equipment" varStatus="index">
			<tr>
				<td>${index.index+1}</td>
				<td>${equipment.equipmentName}</td>
				<td>${equipment.purchaseStatus}</td>
					<%--<td>${fundManagement.id}</td>--%>
				<td>
					<fmt:formatDate value="${equipment.paidDate}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					<fmt:formatDate value="${equipment.arrivalDate}" pattern="yyyy-MM-dd"/>
				</td>
				<td>${equipment.equipmentLocation}</td>
				<td>${equipment.useDate}</td>
				<td>${equipment.societyUseTime}</td>
				<td>${equipment.schoolUseTime}</td>
				<td>${equipment.remark}</td>
				<%--<td><a href="${ctx}/project/equipment/equipment/form?id=${equipment.id}">
					<fmt:formatDate value="${equipment.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</a></td>--%>
				<shiro:hasPermission name="project:equipment:equipment:edit"><td>
    				<a href="${ctx}/project/equipment/equipment/form?id=${equipment.id}">修改</a>
					<a href="${ctx}/project/equipment/equipment/delete?id=${equipment.id}" onclick="return confirmx('确认要删除该设备吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>